import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [ { path: '/', redirect: '/manager/home' } ,
    { path: '/manager', name: 'manager', component: () => import('../views/Manager.vue'),
      children:[
          { path: 'home', name: 'home', component: () => import('../views/HomeView.vue'), },
        { path: 'about', name: 'about', component: () => import('../views/AboutView.vue'), },
        { path: 'button', name: 'button', component: () => import('../views/JsLearn/button.vue'), },


      ]
    },
    { path: '/notFound', name: 'notFound', component: () => import('../views/404.vue'), },
    {path:'/:pathMatch(.*)',redirect:'/notFound'}


  ],
})

export default router
